from fastapi import APIRouter, Depends

from app.core.responses import Response
from modules.admin.services.auth import get_current_user
from app.services.user import UserService

router = APIRouter(prefix="/users", dependencies=[Depends(get_current_user)])


@router.get("/", summary="获取列表")
async def index(current: int = 1, pageSize: int = 10):
    data = UserService.user_list(current, pageSize).serialize()
    return Response.success(data)

